package util;


public class GenerateIdCode {

    public static Integer generaDeviceId() {
        int sixDigitNumber = generateSixDigitFromTimestamp();
        return  sixDigitNumber;
    }

    private static Integer generateSixDigitFromTimestamp() {
        long timestamp = System.currentTimeMillis();
        int sixDigitNumber = (int) (timestamp % 1000000);
        if (sixDigitNumber < 100000) {
            sixDigitNumber += 100000;
        }
        return sixDigitNumber;
    }

}
